QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Windows 32 Draw Contexts

QuickDraw 3D provides routines that you can use to create and manipulate Windows 32 draw contexts.

QuickDraw 3D both locks and clears the Direct Draw surface before each rendering loop, so your software need not perform these operations for a surface during rendering.

Windows 32 draw contexts are always implicitly double buffered.

Q3Win32DCDrawContext_New

You can use the Q3Win32DCDrawContext_New function to create a new Windows 32 draw context object.

TQ3DrawContextObject Q3Win32DCDrawContext_New (
                     const TQ3Win32DCDrawContextData *drawContextData);
drawContextData
Pointer to a Windows 32 draw context data structure.
return value
A Windows 32 draw context object.

DESCRIPTION

Q3Win32DCDrawContext_New returns a Windows 32 draw context object if it is successful; otherwise it returns NULL . The application must set up the necessary data structure, as described in "Windows 32 Draw Context Structure" .

Q3Win32DCDrawContext_GetDC

You can use the Q3Win32DCDrawContext_GetDC function to retrieve the Microsoft Windows draw context associated with a Windows 32 draw context object.

TQ3Status Q3Win32DCDrawContext_GetDC (
                     TQ3DrawContextObject drawContext,
                     HDC *hdc);
drawContext
A draw context object.
hdc
Pointer to a Microsoft Windows draw context.

DESCRIPTION

Q3Win32DCDrawContext_GetDC returns in a structure pointed to by hdc the Microsoft Windows draw context that is associated with the draw context object specified by drawContext .

Q3Win32DCDrawContext_SetDC

You can use the Q3Win32DCDrawContext_SetDC function to set the Microsoft Windows draw context for a Windows 32 draw context object.

TQ3Status Q3Win32DCDrawContext_SetDC (
                     TQ3DrawContextObject drawContext,
                     const HDC hdc);
drawContext
A draw context object.
hdc
Pointer to a Microsoft Windows draw context (can be obtained from a window using the Windows GetDC function).

DESCRIPTION

Q3Win32DCDrawContext_SetDC sets the draw context object identified by drawContext to the draw context specified by hdc .


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |